
import java.util.Iterator;
import java.util.List;
import java.util.TreeSet;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Manuel
 */
public class ListaPersona {
List<Persona> listapersona=(List<Persona>) new TreeSet<Persona>();

    public ListaPersona(Persona actual) {
        listapersona.add(actual);
    }
Iterator  iter=listapersona.iterator();

    public boolean equals(Persona obj) {
        if (obj == null) {
            return false;
        }
        if ( obj.hashCode() !=listapersona.hashCode()) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final ListaPersona other = (ListaPersona) obj;
        if (this.listapersona != other.listapersona && (this.listapersona == null || !this.listapersona.equals(other.listapersona))) {
            return false;
        }
        return true;
    }

}
